import java.util.Arrays;
import java.util.Scanner;

public class GSN003
{

    /*
        属性:
            答案数字;
            猜测数字;
        方法:
            生成答案数字;
            接收猜测数字;

     */

    /*
        5/7
        教我们单元测试(这个由程序员自己完成)

        0.新建一个Test目录(文件夹)
        1.确认"插件"中有无JUnit, 没有的话插件商店下载一个
        2.点开项目结构, 点击选择本项目, 右边选择刚才新建的Test文件夹,
          点击上方Make as栏的测试(Test), 此时Test文件夹变成了蓝色, 最右侧显示添加好的Test文件夹

        3.
     */

    Scanner sc = new Scanner(System.in);
    private int[] guesses = new int[4];
    private int[] answer = new int[4];


    public static void main(String[] args)
    {
        GSN003 game = new GSN003();
        game.receiveGuesses();
        for (int i = 0; i < 4; i++)
        {
            System.out.println(Arrays.toString(game.guesses));
        }
    }

    public void receiveGuesses()
    {
        for (int i = 0; i < 4; i++)
        {
            guesses[i] = sc.nextInt();
        }
    }

    public void generateAnswers()
    {
        answer[0] = (int) (Math.random()*10 + 1);
        answer[1] = (int) (Math.random()*10 + 1);
        answer[2] = (int) (Math.random()*10 + 1);
        answer[3] = (int) (Math.random()*10 + 1);
        // git checkout develop 切换到develop分支上操作
    }

    public void compare()
    {
        int a = 0;
        int b = 0;
        for (int i = 0; i < 4; i++)
        {
            if (guesses[i] == answer[i])
            {
                a++;
            }
        }
        System.out.println("a = "+a+", b = "+b);
    }


}
